<?php
use yii\helpers\Html;
use yii\helpers\Url;
?>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
<!--<link rel="stylesheet" href="dist/sidebar-menu.css">-->
<?= HTML::cssFile('@web/dist/sidebar-menu.css') ?>
<style type="text/css">
.main-sidebar{
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	min-height: 100%;
	width: 230px;
	z-index: 810;
	background-color: #222d32;
 }
</style>

<aside class="main-sidebar">
<section  class="sidebar">
	<ul class="sidebar-menu">
	  <li class="header">主菜单</li>
        <? foreach (Yii::$app->params['permission'] as $v){ ?>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-dashboard"></i> <span><?= $v['lable'] ?></span> <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu" style="display: block;">
                    <? foreach ($v['child'] as $cv){ ?>
                        <li><a href="<?= Url::to([$cv['url']]) ?>"><i class="fa fa-circle-o"></i> <?= $cv['lable'] ?> </a>
                              <? foreach ($cv['child'] as $ccv){ ?>
                                <ul class="treeview-menu" style="display: block;">
                                    <li><a href="<?= Url::to([$ccv['url']]) ?>"><i class="fa fa-circle-o"></i> <?= $ccv['lable'] ?></a></li>
                                </ul>
                              <?}?>
                        </li>
                    <?}?>
                </ul>
            </li>
        <?}?>
	</ul>
  </section>
 </aside>

<!--<script src="js/jquery-2.1.1.min.js" type="text/javascript"></script>-->
<!--<script src="./dist/sidebar-menu.js"></script>-->
<?=Html::jsFile('@web/js/jquery-2.1.1.min.js')?>
<?//=Html::jsFile('@web/dist/sidebar-menu.js')?>
<script>
$.sidebarMenu($('.sidebar-menu'))

</script>
